package com.lei.eduservice.feign;

import com.lei.eduservice.feign.impl.OrderClientHystrix;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * Created by IntelliJ
 * Author:熊磊
 */
@FeignClient(value = "service-order",fallback = OrderClientHystrix.class)
@Component
public interface OrderClient {
    // 根据课程ID和用户ID去判断该客户是否买过该课程
    @GetMapping("/edu/order/isBuy/{courseId}/{memberId}")
    boolean isBuyCourse(@PathVariable("courseId") String courseId, @PathVariable("memberId") String memberId);
}
